#pragma once

#include "notransformactor.h"
#include <QVector>
#include <osg\AnimationPath>

namespace VrDataCore
{
	class VRDATACORE_EXPORT CamreaAnimationBase:public NoTransformActor
	{
	public:
		CamreaAnimationBase();
		virtual void buildPropertyMap();
		void setIndex(int index);
		int getIndex();
	protected:
		~CamreaAnimationBase(){}
		int									_index;
	};
	class VRDATACORE_EXPORT CamreaAnimationActor:public CamreaAnimationBase
	{
	public:
		CamreaAnimationActor();
	protected:
		~CamreaAnimationActor();
		QVector<QVector<osg::Vec3>>							_cameraAttitudeVector;
		QVector<int>										_frameNumberVector;
		QString												_allAttitudeString;
		QString												_frameNumberString;
	public:
		virtual void buildPropertyMap();
		void addCameraAttitude(const osg::Vec3& eye,const osg::Vec3& center,const osg::Vec3& up,int framenumber = -1);
		void setCamreaAttitude(QString allattitude);
		QString getCamreaAttitude();
		void setCamreaFrameNumber(QString framenumberstring);
		QString getCamreaFrameNumber();
		QVector<QVector<osg::Vec3>> getCameraAttitudeVector();
		QVector<int> getFrameNumberVector();
		void removeCameraAttitude(int index);
		void resetFrameNumber(int index,int framenumber);
		int getFrameNumberByIndex(int index);
	};

	class VRDATACORE_EXPORT ImpCamreaAnimationActor:public CamreaAnimationBase
	{
	public:
		ImpCamreaAnimationActor();
	protected:
		~ImpCamreaAnimationActor();
		osg::ref_ptr<osg::AnimationPath>						_animationNode;
	public:
		virtual void buildPropertyMap();
		void setCameraAnimationControlMap(osg::AnimationPath::TimeControlPointMap& map);
		void setCameraTimeControlPointMap(QString data);
		QString getCameraTimeControlPointMap();
		osg::ref_ptr<osg::AnimationPath> getCameraAnimationPath();
	};
}